<html>

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>个人中心</title>
	<meta name="format-detection" content="telephone=no,email=no" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0,viewport-fit=cover">
	<link href="__PUBLIC__/Admin/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
	<link href="__PUBLIC__/Admin/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
	<link href="__PUBLIC__/Admin/css/animate.min.css" rel="stylesheet">
	<link href="__PUBLIC__/Admin/css/style.min862f.css?v=4.1.0" rel="stylesheet">
	<link href="__PUBLIC__/Home/css/page.css" rel="stylesheet">
	<script>
		;
		(function (win, lib) {
			var doc = win.document;
			var docEl = doc.documentElement;
			var metaEl = doc.querySelector('meta[name="viewport"]');
			var flexibleEl = doc.querySelector('meta[name="flexible"]');
			var dpr = 0;
			var scale = 0;
			var tid;
			var flexible = lib.flexible || (lib.flexible = {});

			if (metaEl) {
				// console.warn('将根据已有的meta标签来设置缩放比例');
				var match = metaEl.getAttribute('content').match(/initial\-scale=([\d\.]+)/);
				if (match) {
					scale = parseFloat(match[1]);
					dpr = parseInt(1 / scale);
				}
			} else if (flexibleEl) {
				var content = flexibleEl.getAttribute('content');
				if (content) {
					var initialDpr = content.match(/initial\-dpr=([\d\.]+)/);
					var maximumDpr = content.match(/maximum\-dpr=([\d\.]+)/);
					if (initialDpr) {
						dpr = parseFloat(initialDpr[1]);
						scale = parseFloat((1 / dpr).toFixed(2));
					}
					if (maximumDpr) {
						dpr = parseFloat(maximumDpr[1]);
						scale = parseFloat((1 / dpr).toFixed(2));
					}
				}
			}
			if (!dpr && !scale) {
				var isAndroid = win.navigator.appVersion.match(/android/gi);
				var isIPhone = win.navigator.appVersion.match(/iphone/gi);
				var devicePixelRatio = win.devicePixelRatio;
				if (isIPhone) {
					// iOS下，对于2和3的屏，用2倍的方案，其余的用1倍方案
					if (devicePixelRatio >= 3 && (!dpr || dpr >= 3)) {
						dpr = 3;
					} else if (devicePixelRatio >= 2 && (!dpr || dpr >= 2)) {
						dpr = 2;
					} else {
						dpr = 1;
					}
				} else {
					// 其他设备下，仍旧使用1倍的方案
					dpr = 1;
				}
				scale = 1 / dpr;
			}
			docEl.setAttribute('data-dpr', dpr);
			if (!metaEl) {
				metaEl = doc.createElement('meta');
				metaEl.setAttribute('name', 'viewport');
				metaEl.setAttribute('content', 'initial-scale=' + scale + ', maximum-scale=' + scale + ', minimum-scale=' + scale +
					', user-scalable=no');
				if (docEl.firstElementChild) {
					docEl.firstElementChild.appendChild(metaEl);
				} else {
					var wrap = doc.createElement('div');
					wrap.appendChild(metaEl);
					doc.write(wrap.innerHTML);
				}
			}

			function refreshRem() {
				var width = docEl.getBoundingClientRect().width;
				if (width / dpr > 750) {
					width = 750 * dpr;
				}
				var rem = width / 10;
				docEl.style.fontSize = rem + 'px';
				flexible.rem = win.rem = rem;
			}
			win.addEventListener('resize', function () {
				clearTimeout(tid);
				tid = setTimeout(refreshRem, 100);
			}, false);
			win.addEventListener('pageshow', function (e) {
				if (e.persisted) {
					clearTimeout(tid);
					tid = setTimeout(refreshRem, 100);
				}
			}, false);
			if (doc.readyState === 'complete') {
				doc.body.style.fontSize = 12 * dpr + 'px';
			} else {
				doc.addEventListener('DOMContentLoaded', function (e) {
					doc.body.style.fontSize = 12 * dpr + 'px';
				}, false);
			}

			refreshRem();
			flexible.dpr = win.dpr = dpr;
			flexible.refreshRem = refreshRem;
			flexible.rem2px = function (d) {
				var val = parseFloat(d) * this.rem;
				if (typeof d === 'string' && d.match(/rem$/)) {
					val += 'px';
				}
				return val;
			}
			flexible.px2rem = function (d) {
				var val = parseFloat(d) / this.rem;
				if (typeof d === 'string' && d.match(/px$/)) {
					val += 'rem';
				}
				return val;
			}
		})(window, window['lib'] || (window['lib'] = {}));
	</script>
</head>
<style type="text/css">
	body {
		background-color: #ededed; 
		margin: 0;
		padding: 0;
		position: relative;
		padding-top: constant(safe-area-inset-top);
		padding-right: constant(safe-area-inset-right);
		padding-bottom: constant(safe-area-inset-bottom);
		padding-left: constant(safe-area-inset-left);
		overflow-y:scroll ;
	}
	body::-webkit-scrollbar {
            width: 0;
            height: 0;
            display: none;
        }

	p {
		margin: 0;
		padding: 0;
	}

	.headimg {
		flex: 1;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.header {
		background-color: #fff;
		padding: 0.38rem;
		width: 100%;
	}

	.headimg img {
		width: 1.66rem;
		height: 1.66rem;
		display: block;
		border-radius: 6px;
	}

	.headimg .right {
	  flex: 1;
	  padding-left: 18px;
	  box-sizing: border-box;
	  display: flex;
	  flex-flow: column nowrap;
	  justify-content: space-between;
	}

	.right>p {
		color: #323332;
	}

	.mdata {
		padding: 10px 20px 0 20px;
	}

	.mdata li {
		list-style: none;
		float: left;
		width: 33.33%;
		text-align: center;
	}

	.mdata li .p1 {
		color: #323332;
	}

	.clear {
		clear: both;
	}

	.ulist {
		margin-bottom: 10px;
		display: block;
		background: #fff;
		padding: 0;
	}

	.ulist li {
		list-style: none;
		padding: 8px 20px;
		color: #211e1e;
		border-bottom: 1px solid rgba(189, 175, 175, 0.15);
	}

	.ulist li p {
		display: inline-block;
	}

	.ulist li .p2 {
		float: right
	}

	.back {
		display: block;
		width: 100%;
		height: 40px;
		line-height: 40px;
		font-size: 16px;
		text-align: center;
		color: #323332;
		position: fixed;
		bottom: 0;
		background: #393a3e;
	}

	.header-nav {
		width: 100%;
		height: 40px;
		background-color: #262216;
		text-align: center;
		position: relative;
		line-height: 40px;
		top: 0;

	}

	.header-nav span {
		font-size: 0.45rem;
		color: #323332;
	}

	.header-nav img {
		position: absolute;
		right: 0.2rem;
		top: 0.15rem;
		height: .72rem;
		width: .72rem;
	}

	/* .main { */
		/* height: 14.86rem; */
		/* padding-top: 0.4rem;
		background: -webkit-linear-gradient(#443830, #242527);
		/* Safari 5.1 - 6.0 */
		/* background: -o-linear-gradient(#443830, #242527); */
		/* Opera 11.1 - 12.0 */
		/* background: -moz-linear-gradient(#443830, #242527); */
		/* Firefox 3.6 - 15 */
		/* background: linear-gradient(#443830, #242527); */
		/* 标准的语法（必须放在最后） */ 
	/* } */
	section {
		width: 9.33rem;
		margin: 2.6rem auto 0 auto;
		border: 1px solid #aaa764;
		text-align: center;
		background-color:#fff;
		padding: 0.1rem 0;
		border-radius: 0.2rem;
	}

	section>p {
		color: #323332;
	}

	section>p:nth-child(1) {
		font-size: 0.246rem;
	}

	section>p:nth-child(2) {
		font-size: 0.646rem;
		margin: 0.1rem;
	}

	section>a {
		width: 1.6rem;
		height: 0.666rem;
		display: block;
		text-align: center;
		line-height: 0.666rem;
		background-color: #393938;
		border-radius: 0.8rem;
		color: #323332;
		text-decoration: none;
		margin: 0 auto;
	}

	.main-list {
		width: 100vw;
		display: flex;
		flex-flow: column nowrap;
		height: 12.5rem;
		overflow: auto;
	}

	.main-list a {
		display: flex;
		align-items: center;
		width: 100%;
		height: 1.8rem;
		margin: 0;
		text-align: left;
		color: #323332;
		font-size: 0.246rem;
		padding-left: 0.33rem;
		box-sizing: border-box;
		text-decoration: none;
		background: #fff;
		-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
		-webkit-user-select: none;
		-moz-user-focus: none;
		-moz-user-select: none;
	}
	.main-list a:first-child,.main-list a:last-child{
		margin: 9px auto;
	}
	.main-list a:last-child{
		background-color: #07c160;
		color: #fff;
	}
	.main-list>a>img {
		width: 0.78rem;
	}

	.main-list .list-text{
		flex: 1;
		text-align: left;
		padding-left: 12px;
		box-sizing: border-box;
		font-size: 0.4rem;
		font-weight: 450;
		border-bottom: 1px solid #e7e7e7;
		line-height: 1.8rem;
	}

	footer {
		width: 100vw;
		height: 60px;
		left: 50%;
		transform: translate(-50%);
		background: #f7f7f7;
		position: fixed;
		bottom: 0;
		z-index: 1111;
		display: flex;
		justify-content: space-around;
		box-sizing: border-box;
		padding: 5px 0;
	}

	footer a {
		display: flex;
		flex-flow: column nowrap;
		justify-content: center;
		align-items: center;
		text-align: center;
        -webkit-tap-highlight-color: #f7f7f7;
		text-decoration: none;
		-webkit-user-select: none;
		-moz-user-focus: none;
		-moz-user-select: none;
		font-size: 0.246rem;
		height: 100%;
	}
	footer p{
		color: #aeadad;
		font-size: 12px;
		font-weight: 400;
	}
	.right-p1 {
		font-size: 0.42rem;
	}

	.right-p2 {
		font-size: 0.32rem;
		padding-top: 4px;
	}

	.today {
		display: flex;
		justify-content: space-around;
	}

	.today p {
		margin: 0;
		color: #323332;
	}

	.lose>p:nth-child(1),
	.commission>p:nth-child(1) {
		font-size: 0.246rem;
	}

	.lose>p:nth-child(2),
	.commission>p:nth-child(2) {
		font-size: 0.42rem;
	}

	.today-line {
		width: 1px;
		height: 1rem;
		background-color: #fff98d;
	}

	.sec-line {
		width: 7rem;
		margin: 0.2rem auto 0.3rem auto;
		height: 1px;
		background-color: #fff98d;
	}

	/* .lose {
		margin-left: 1.2rem;
	} */

	.commission {
		margin-right: 1.2rem;
	}
	.black_overlay{
      display: none;
      position: absolute;
      top: 0%;
      left: 0%;
      width: 100%;
      height: 100%;
      background-color: black;
      z-index:1001;
      -moz-opacity: 0.8;
      opacity:.30;
      filter: alpha(opacity=88);
    }
    .white_content {
      display: none;
      position: absolute;
      top: 35%;
      /* left: 25%; */
      bottom: 0;
      width: 10rem;
      height: 13.33rem;
      /* padding: 20px; */
      /* border: 10px solid orange; */
      background-color: #d5c587;
      opacity: 0.96;
      z-index:1002;
      overflow: auto;
      border-top: 2px solid #ffe668;
    }
    .close{
        display: none;
        width: 0.88rem;
        height: 2.09rem;
        position: absolute;
        top:24%;
        left:50%;
        bottom: 13.24rem;
        z-index: 11111;
        transform: translate(-0.44rem);
		opacity: 1;
    }
    #light>p{
        width: 10rem;
        margin: 0;
        height: 1.06rem;
        border-bottom: 1px solid #67603a;
        text-align: center;
        line-height: 1.06rem;
        font-size: 0.546rem;
        color: #323332;
    }
	.game{
        width: 100%;
        display: flex;
        justify-content: space-around;
        flex-wrap: wrap;
    }
    .game li{
        width: 3rem;
        text-align: center;
        margin: 0.5rem 0;
    }
    .game li a{
        text-align: center;
    }
    #ig img{
        width: 1.66rem;
        height: 1.66rem;
    }
    .game-p{
        width: 3rem;
        text-align: center;
        color: white;
        font-size: 0.4rem;
    }
	#spread{
		width: 1.08rem;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
   .black_overlay4{
      display: none;
      position: absolute;
      top: 0%;
      left: 0%;
      width: 100%;
      height: 100%;
      background-color: black;
      z-index:100111;
      -moz-opacity: 0.8;
      opacity:.80;
      filter: alpha(opacity=88);
    }
	.white_content4 {
      display: none;
      position: absolute;
      top: 35%;
      /* left: 25%; */
      bottom: 0;
      width: 10rem;
      height: 14.33rem;
      /* padding: 20px; */
      /* border: 10px solid orange; */
      background-color: #262626;
      z-index:100211;
      /* overflow: auto; */
      border-top: 2px solid #ffe668;
    }
    .close4{
        display: none;
        width: 0.88rem;
        height: 2.09rem;
        position: absolute;
        top:24%;
        left:50%;
        bottom: 13.24rem;
        z-index: 111111;
        transform: translate(-0.44rem);
    }
   #light4>p{
        width: 10rem;
        margin: 0;
        height: 1.06rem;
        border-bottom: 1px solid #67603a;
        text-align: center;
        line-height: 1.06rem;
        font-size: 0.546rem;
        color: #323332;
    }
	.header-con{
		width: 100%;
		padding: 0.64rem 0;
		display: flex;
		align-items: flex-end;
		justify-content: space-between;
	}
</style>

<body>
	<div class="header">
		<div class="header-con">
			<div class="headimg">
				<img src="{$user.headimgurl}">
				<div class="right">
					<p class="right-p1" style="font-weight: 500;">
						<font color="#323332">{$user.nickname}&nbsp;(￥<span id="aj_ye">{$user.points}</span>)</font>
					</p>
					<p class="right-p2" style="color:#8c8686;">用户编号:{$user.username}</p>
				</div>
			</div>
			<a href="{:U('Home/Run/tui')}?uid={$userinfo.id}" id="spread">
			  <img src="__PUBLIC__/Home/img/code-header.png" style="width: 0.52rem;" alt="">
			  <img src="__PUBLIC__/Home/img/game_right.png" style="width: 0.4rem;" alt="">
			</a>
		</div>
	</div>
	<main class="main">
		<!-- <section>
			<p id="aj">账户余额</p>
			<p >￥<span id="aj_ye">{$user.points}</span></p>
			<a href="{:U('Home/Fen/addpage')}?type=pk10">充值</a>
			<div class="sec-line"></div>
			<div class="today">
				<div class="lose">
					<p>今日盈亏</p>
					<p>￥{$user.ying}</p>
				</div>
				<div class="today-line"></div>
				<div class="commission">
					<p>今日佣金</p>
					<p>￥{$user.yong_today}</p>
				</div>
			</div>
		</section> -->
		<div class="main-list">
			<!-- <a href="/Home/User/yzqpage"><img src="__PUBLIC__/Home/img/yjzr.png" alt="">
				<p>佣金转入</p>
			</a>
			<a href="/Home/User/fzqpage"><img src="__PUBLIC__/Home/img/22.png" alt="">
				<p>反水转入</p>
			</a> -->
			<a href="/Home/User/offline?id={$user.id}">
				<img src="__PUBLIC__/Home/img/18.png" alt="">
				<p class="list-text">我的下线</p>
			</a>
			<a href="/Home/User/xiazhu?t=1">
				<img src="__PUBLIC__/Home/img/17.png" alt="">
				<p class="list-text">下注明细</p>
			</a>
			<a href="/Home/User/fenxia">
				<img src="__PUBLIC__/Home/img/txjl.png" alt="">
				<p class="list-text">提现记录</p>
			</a>
			<a href="/Home/User/fenadd">
				<img src="__PUBLIC__/Home/img/czjl.png" alt="">
				<p class="list-text">充值记录</p>
			</a>
			<!-- <a href=""><img src="__PUBLIC__/Home/img/yhk.png" alt="">
				<p>银行卡绑定</p>
			</a> -->
			<a href="{:U('Home/Fen/addpage')}?type=pk10">
				<img src="__PUBLIC__/Home/img/zzcz.png" alt="">
				<p class="list-text">自助充值</p>
			</a>
			<a href="{:U('Home/Fen/xiapage')}?type=pk10">
				<img src="__PUBLIC__/Home/img/zztk.png" alt="">
				<p class="list-text">自助提款</p>
			</a>
			<a href="/Home/Index/bind?id={$userinfo.id}">
				<img src="__PUBLIC__/Home/img/binding.png" alt="">
				<p class="list-text" style="border: none;">修改密码</p>
			</a>
			<a href="{:U('Home/Index/login')}">
				<img src="__PUBLIC__/Home/img/menuList4.png" alt="">
				<p class="list-text">退出登录</p>
			</a>
		</div>
	</main>

	<footer>
		<a href="/Home/Run/index">
			<img src="__PUBLIC__/Home/img/11.png" alt="" style="width:24px">
            <p>消息</p>
        </a>
        <!-- <a href="{:U('Home/Fen/addpage')}?type=pk10"><img src="__PUBLIC__/Home/img/12.png" alt="" style="width:0.64rem;height: 0.72rem;">
            <p>充值</p>
        </a>
        <a href="{:U('Home/Fen/xiapage')}?type=pk10"><img src="__PUBLIC__/Home/img/12.png" alt="" style="width:0.64rem;height: 0.72rem;">
            <p>提现</p>
        </a> -->
		<a href="{:U('Home/User/customer')}">
			<img src="__PUBLIC__/Home/img/14.png" alt="" style="width:24px">
            <p>客服</p>
        </a>
		<a href="{:U('Home/User/index')}">
			<img src="__PUBLIC__/Home/img/13s.png" alt="" style="width:24px">
            <p style="color:#07c160;">我的</p>
        </a>  
    </footer>
	<!-- <ul class="mdata">
				<div class="clear"></div>
				<li>
					<p class="p1">{$user.points}</p>
					<p>我的钱包</p>
				</li>
				<li>
					<p class="p1">{$user.ying}</p>
					<p>今日盈亏</p>
				</li>
				<li>
					<p class="p1">{$user.yong_today}</p>
					<p>今日推广佣金</p>
				</li>
				<div class="clear"></div>
			</ul> -->


	<!-- <ul class="ulist">
			<a href="/Home/User/yzqpage">
				<li>
					<p>佣金转入钱包</p>
					<p class="p2">共<font color="#d4a448">{$user.yong|default="0"}</font>元</p>
				</li>
			</a>
		</ul>

		<ul class="ulist">
			<a href="/Home/User/fzqpage">
				<li>
					<p>返水金额转入钱包</p>
					<p class="p2">共<font color="#d4a448">{$user.fanshui|default="0"}</font>元</p>
				</li>
			</a>
		</ul>
		
		<ul  class="ulist">
			<a href="/Home/User/offline?id={$user.id}">
				<li>
					<p>我的下线</p>
					<p class="p2">共<font color="#d4a448">{$user.t_account}</font>人 ></p>
				</li>
			</a>
			<a href="/Home/User/fenadd">
				<li>
					<p>充值记录</p>
					<p class="p2">查看 ></p>
				</li>
			</a>
			<a href="/Home/User/fenxia">
				<li>
					<p>提现记录</p>
					<p class="p2">查看 ></p>
				</li>
			</a>
		</ul>

		<ul class="ulist">
			<a href="/Home/User/xiazhu?t=1">
				<li>
					<p>下注明细</p>
					<p class="p2">查看 ></p>
				</li>
			</a>
			<if condition="C('is_qrcode') eq 1">
				<a href="{:U('Home/Run/tui')}?uid={$userinfo.id}">
					<li>
						<p>我的推广</p>
						<p class="p2">查看 ></p>
					</li>
				</a>
			</if>
			
		
			
		</ul>

		<ul class="ulist">

			<if condition="C('is_weixin') eq 1 && $is_weixin eq false">
				<a href="/Home/User/uppwd">
					<li>
						<p>修改密码</p>
						<p class="p2">查看 ></p>
					</li>
				</a>
			</if>
			<a href="__ROOT__/Uploads{$kefu.kefu}">
				<li>
					<p>联系客服</p>
					<p class="p2">查看 ></p>
				</li>
			</a>

			<if condition="C('is_weixin') eq 1 && $is_weixin eq true">
			<else />
				<a href="/Home/Index/logout">
					<li>
						<p>退出</p>
						<p class="p2"></p>
					</li>
				</a>
			</if>
			
			
		</ul>

		<a class="back" href="{:U('Home/Run/index')}">返回游戏</a> -->


	<script src="__PUBLIC__/Admin/js/jquery.min.js?v=2.1.4"></script>
	<script src="__PUBLIC__/Admin/js/bootstrap.min.js?v=3.3.6"></script>
	<script src="__PUBLIC__/Common/js/ajaxForm.js"></script>
	<script src="__PUBLIC__/layer/layer.js"></script>



	<script type="text/javascript">
		$(function () {
			$('#LoginForm').ajaxForm({
				beforeSubmit: checkForm,
				success: complete,
				dataType: 'json'
			});

			function checkForm() {

			}

			function complete(data) {
				if (data.status == 1) {
					$('.btn').attr('disabled', 'disabled');
					layer.msg(data.info, function (index) {
						layer.close(index);
						window.location.href = data.url;
					});
				} else {
					layer.msg(data.info);
					$('#password').val('').focus();
					return false;
				}
			}
		});
	</script>
	<script>
		$(document).ready(function () {
			jQuery.ajax({
				url: "{:U('Home/Index/tipList')}",
				type: "post",
				cache: false,
				// data: { "content":''},
				dataType: "json",
				contentType: "application/x-www-form-urlencoded; charset=UTF-8",
				beforeSend: function () {
					//alert("before:show loading");
				},
				//请求成功时处理。注意连接成功才会有返回值
				success: function (req) {
					console.log(req)
					console.log(req.msg)
					console.log(req.content[1].content)
					// $('#aj').html(req.content[1].content)
				},
				//请求出错处理。注意：有差错时才执行程序体，才会出现alert弹框
				error: function (XMLHttpRequest, textStatus, errorThrown) {

				},

				complete: function (XMLHttpRequest, textStatus) {
					this; // 调用本次AJAX请求时传递的options参数
					// alert("complete textStatus:"+textStatus);//error 或  success
					//alert("complete:hide loading");
				}
			});
		});
		//});
	</script>
	<!--推送-->
	<script src='//cdn.bootcss.com/socket.io/1.3.7/socket.io.js'></script>
	<script>
        var uid = '{$userinfo.id}';
        function escape2Html(str) {
            var arrEntities={'lt':'<','gt':'>','nbsp':' ','amp':'&','quot':'"'};
            return str.replace(/&(lt|gt|nbsp|amp|quot);/ig,function(all,t){return arrEntities[t];});
        }
        $(document).ready(function() {
            // 连接服务端
            var socket = io('http://' + document.domain + ':12223');
            // 连接后登录
            socket.on('connect', function() {
                socket.emit('login', uid);
            });
            // 后端推送来消息时
            socket.on('new_msg', function(msg) {
                var data = eval("(" + escape2Html(msg) + ")");
                if (data['type'] == '3' || data['type'] == '4' || data['type'] == '1' ||data['type'] == '2') {
                    return false;
                }
                var time = data['time'];
                var content = data['content'];

                if(data['points'] && data['to']=='{$userinfo.id}'){

                    var points = parseFloat($('#aj_ye').html())+parseFloat(data['points']);
                    console.log(points);
                    console.log(parseFloat($('#aj_ye').html()));
                    console.log(parseFloat(data['points']));
                    console.log('1');
                    console.log($('#aj_ye').html());
                    console.log(data['points']);
                    $('#aj_ye').html(points);
                }
            });
        });
	</script>
	<!--推送-->
</body>

</html>